<extend name="Public/base" />
<block name="style">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/chosen_v1.8.5/chosen.min.css">
</block>
<block name="body">
	<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
	<div class="main-title cf">
		<h2><if condition="!$data">新增<else/>编辑</if>评论</h2>
	</div>
	<!-- 表单 -->
	<form id="form" action="{:U('record/saveComment')}" method="post" class="form-horizontal">
		<div class="form-item cf">
			<label class="item-label">姓名</label>
			<div class="controls">
				<input type="text" class="text input-large" name="name" value="{$data.name}">
			</div>
		</div>
		<div class="form-item cf">
			<label class="item-label">医院</label>
			<div class="controls">
				<input type="text" class="text input-large" name="hospital" value="{$data.hospital}">
			</div>
		</div>


		<div class="form-item cf">
			<label class="item-label">评论内容</label>
			<div class="controls">
				<label class="textarea input-large"><textarea name="comment">{$data.comment}</textarea></label>
			</div>
		</div>


        <div class="form-item">
            <label id="time_label" class="item-label">评论时间</label>
            <div class="controls">
                <input type="text" class="text datetime" AUTOCOMPLETE="off" name="comment_date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                       placeholder="开始时间" value="{$data ?  $data['comment_date'] : ''}" >
            </div>
        </div>




		<div class="form-item">
			<input type="hidden" name="id" value="{$data.id}"/>
			<input type="hidden" name="record_id" value="{$record_id}"/>
			<button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确 定</button>
			<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
		</div>
	</form>
</block>

<block name="script">
    <script type="text/javascript" src="__PUBLIC__/static/My97DatePicker/WdatePicker.js"></script>
	<script src="__PUBLIC__/static/chosen_v1.8.5/chosen.jquery.min.js"></script>
	<script type="text/javascript" charset="utf-8">
		Think.setValue('type',{$data.type|default=1});
		//导航高亮
        highlight_subnav('{:U('Record/index')}');

	</script>
</block>
